import 'package:hive/hive.dart';

part 'noteModel.g.dart';

@HiveType(typeId: 0)
class Note {
  @HiveField(0)
  final String id;

  @HiveField(1, defaultValue: '')
  String title;

  @HiveField(2)
  final DateTime createTime;

  @HiveField(3)
  DateTime editTime;

  @HiveField(4, defaultValue: '')
  String data;

  @HiveField(5, defaultValue: false)
  bool isFavorite;

  @HiveField(6, defaultValue: <String>[])
  List<String> images;

  @HiveField(7, defaultValue: false)
  bool isLocked;

  Note({
    required this.id,
    this.title = '',
    required this.createTime,
    required this.editTime,
    this.data = '',
    this.isFavorite = false,
    this.isLocked = false,
  }) : images = <String>[];
}
